#pragma once

#include "Driver.h"
#include "XThread.h"
#include "RoboServer.h"
#include <fstream>

#define SERVER_PORT 9998

class CtrlServer :    public RoboServer, public XThread
{
public:
	CtrlServer(Driver* input_Driver);
	~CtrlServer();

	void Main() override;

    Driver* driver;
    CTRL_DATA* ctrl_data;

    struct CtrlData
    {
        float Head[3];
        float LeftHand[8];
        float RightHand[8];
    };

    void TransCtrlData(CtrlData& ctrlData, CTRL_DATA* ctrl_data);
};

